﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<LiteratureManage.Domain.Models.Author>" %>

<div>
<%using(Html.BeginForm()){ %>
<%=Html.ClientSideValidation<LiteratureManage.Domain.Models.Author>() %>
<ul>
    <li>
    作者姓名：<%=Html.TextBoxFor(m=>m.Name) %>
    <%=Html.ValidationMessageFor(m=>m.Name) %>
    </li>
    <li>
    作者性别：<%=Html.RadioButtonFor(m => m.Gender, 0, new { @checked = "checked" })%>男
    <%=Html.RadioButtonFor(m=>m.Gender,1) %>女
    </li>
    <li>
    联系单位：<%=Html.TextBoxFor(m=>m.Org) %>
    </li>
    <li>
    联系电话：<%=Html.TextBoxFor(m=>m.Phone) %>
    </li>
    <li>
    联系手机：<%=Html.TextBoxFor(m=>m.Mobile) %>
    </li>
    <li>
    联系地址：<%=Html.TextBoxFor(m=>m.Address) %>
    </li>
    <li>
    电子邮件：<%=Html.TextBoxFor(m=>m.Email) %>
    </li>
    <li>
    <input type="submit" value="保存信息" />
    </li>
</ul>
<%} %>
</div>
<script type="text/javascript">
    $("form", document).ajaxForm({
        dataType: "json",
        success: function(data) {
            if (data.state == 100) {
                window.location = data.data.url;
            }
            else {
                alert(data.message);
            }
        }
    });
</script>
